package com.guigu.www.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName("m_proceduring")
public class MProceduring {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;                 //序号
    @TableField("PARENT_ID")
    private Integer parentId;           //父级序号
    @TableField("details_number")
    private Integer detailsNumber;      //工序序号
    @TableField("procedure_id")
    private String procedureId;         //工序编号
    @TableField("procedure_name")
    private String procedureName;       //工序名称
    @TableField("labour_hour_amount")
    private Integer labourHourAmount;   //本次工时数
    @TableField("cost_price")
    private Integer costPrice;          //单位工时成本
    @TableField("subtotal")
    private Integer subtotal;           //工时成本小计
    @TableField("procedure_describe")
    private String procedureDescribe;   //工序描述
    @TableField("reg_count")
    private Integer regCount;           //登记次数
    @TableField("procedure_responsible_person")
    private String procedureResponsiblePerson;      //负责人
    @TableField("register")
    private String register;        //登记人
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("register_time")
    private Date registerTime;      //登记时间
    @TableField("checker")
    private String checker;     //审核人
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("check_time")
    private Date checkTime;         //审核时间

    //生产工序物料表
    @TableField(exist = false)
    List<MProcedureModuling> mprocedureModulings;
    //物料表
    @TableField(exist = false)
    private List<MProcedureModule> mproceduremodules;

    //    注：
    //            1、PARENT_ID和M_MANUFACTURE的ID相对应，为外键
    //2、REG_COUNT为工序的生产登记次数，如果是第一次生产则REG_COUNT为1，如果是第二次生产则REG_COUNT为2，以此类推
}
